<template>
  <div class="base-home">
    <van-swipe :autoplay="3000" class="my-swipe" indicator-color="white">
      <van-swipe-item>1</van-swipe-item>
      <van-swipe-item>2</van-swipe-item>
      <van-swipe-item>3</van-swipe-item>
      <van-swipe-item>4</van-swipe-item>
    </van-swipe>
    <house-card
      v-for="building in buildingList"
      :key="building.bid"
      title="住房"
      :info="building"
    />
  </div>
</template>

<script>
import HouseCard from "../components/house-card";

export default {
  components: { HouseCard },
  data() {
    return {
      buildingList: [],
    };
  },
  mounted() {
    this.HttpManager.getBuildingList().then(res => {
      if (res.code === 0) {
        this.buildingList = res.data;
      }
    })
  },
  methods: {

  },
}
</script>

<style lang="less" scoped>
  .base-home {
    .my-swipe .van-swipe-item {
      color: #fff;
      font-size: 20px;
      line-height: 150px;
      text-align: center;
      background-color: #39a9ed;
    }
  }
</style>
